<!-- redirect/index.vue - 页面重定向（用于刷新） -->
<script setup>
import { onBeforeMount } from 'vue'
import { useRouter, useRoute } from 'vue-router'

const router = useRouter()
const route = useRoute()

onBeforeMount(() => {
  const { params, query } = route
  const { path } = params
  
  // 立即重定向到目标路径
  router.replace({
    path: '/' + (Array.isArray(path) ? path.join('/') : path),
    query
  })
})
</script>

<template>
  <div></div>
</template>

